# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libxml++-2.6
_pkgname=libxml++
pkgver=2.42.2
pkgrel=2
pkgdesc="libxml++ is a C++ wrapper for the libxml XML parser library."
url="https://libxmlplusplus.github.io/libxmlplusplus/"
arch="all"
license="LGPL-2.1-only"
makedepends="meson libxml2-dev glibmm-dev python3"
subpackages="$pkgname-dev"
source="https://github.com/libxmlplusplus/libxmlplusplus/releases/download/$pkgver/libxml++-$pkgver.tar.xz"
builddir="$srcdir/$_pkgname-$pkgver"
# FIXME: seem to fail with new libxml
options="!check"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dbuild-tests=true \
		-Dbuild-examples=false \
		-Dbuild-documentation=false \
		. output
	meson compile -C output
}

check() {
	LANG=C LC_ALL=C meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
214da4c8120fedc96adf6ad965b65be9f4deb53d86f41667c236c52e1e3aace819fc61b096815879cc38aaf12ac77fbccb050088ce6bc3ff03030dcc81e4a8c9  libxml++-2.42.2.tar.xz
"
